﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataAccess;
using DTO;
namespace Business
{
    public static class GroundBUS
    {
        public static List<GroundDTO> GetGroundList()
        {
            return GroundDAO.GetGroundList();
        }

        public static List<TeamDTO> GetTeamListByGroundID(GroundDTO dtoGround)
        {
            return GroundDAO.GetTeamListByGroundID(dtoGround);
        }

        public static bool IsGroundNameExists(GroundDTO dtoGround)
        {
            return GroundDAO.FindGround(dtoGround, GroundColumns.GROUND_NAME) != null;
        }   

        public static GroundDTO FindGround(GroundDTO dtoGround, string searchOption)
        {
            return GroundDAO.FindGround(dtoGround, searchOption);
        }

        public static bool AddNewGround(GroundDTO dtoGround)
        {
            return GroundDAO.AddNewGround(dtoGround);
        }

        public static bool UpdateGround(GroundDTO dtoGround)
        {
            return GroundDAO.UpdateGround (dtoGround);
        }

        public static bool DeleteAGround(GroundDTO dtoGround)
        {
            return GroundDAO.DeleteAGround(dtoGround);
        }

        public static bool DeleteAllGround()
        {
            return GroundDAO.DeleteAllGround();
        }
    }
}
